<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
 <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="css/style.css"/>       
        <link href="assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
        	<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="js/jquery-1.9.1.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="Widget/Validform/5.3.2/Validform.min.js"></script>
		<script src="assets/js/jquery.dataTables.min.js"></script>
		<script src="assets/js/jquery.dataTables.bootstrap.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>           	
        <script src="assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
        <script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>
		<script src="js/lrtk.js" type="text/javascript" ></script>
	    <script src="assets/laydate/laydate.js" type="text/javascript"></script>
<title>产品交接单</title>

</head>

<body>
	
<div class="margin clearfix">
 <div class="stystems_style">
  <div class="tabbable">
  <div class="page-content clearfix">
    <div id="Member_Ratings">
     <!-- <div class="d_Confirm_Order_style">
	<ul class="nav nav-tabs" id="myTab">
	  <li class="active">
		<a data-toggle="tab" href="#home"><i class="green fa fa-home bigger-110"></i>产品交接单</a></li>
	</ul>
	</div>-->
	<div class="search_style">   
      <ul class="search_content clearfix">
       <li><label class="l_f">交接单查询：</label><input name="" type="text"  class="text_add" placeholder="输入订单编号"  style=" width:400px"/></li>
       <li><label class="l_f">入库时间：</label><input class="inline laydate-icon" id="start" style=" margin-left:10px;"></li>
       <li style="width:90px;"><button type="button" class="btn_search"><i class="icon-search"></i>查询</button></li>
      </ul>
    </div>
	<!---->
     <div class="border clearfix">
       <span class="l_f">
        <a href="javascript:ovid()" id="member_add" class="btn btn-warning"><i class="icon-plus"></i>新增交接单</a>
		<a class="btn btn-primary radius" onclick="member_dy()">&nbsp;打印交接单</a>	
        <a href="javascript:ovid()" class="btn btn-danger"><i class="icon-trash"></i>批量删除</a>
       </span>
     </div>
	<div class="tab-content">				
	 <div id="home" class="tab-pane active">						
         <table class="table table-striped table-bordered table-hover" id="sample-table">
		<thead>
		 <tr>
				<th width="25"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
				<th width="120">交接单号</th>
				<th width="120">订单编号</th>
				<th width="120">产品名称</th>
				<th width="120">产品型号</th>
				<th width="120">生产部门</th>
				<th width="120">收货仓库</th>
				<th width="120">入库数量</th>			
				<th width="120">交接日期</th>
				<th width="100">交接人</th>
				<th width="120">备注</th>
				<th width="150">状态</th>
			</tr>
		</thead>
	<tbody>
		<tr>
          <td><label><input type="checkbox" class="ace ace_cek"><span class="lbl"></span></label></td>
		  <td>JJ2016021812</td>
          <td>201608080001</td>
          <td>48V电池</td>
          <td>48VDH</td>
          <td>生产一线</td>
		  <td>杭州仓</td>
          <td>200</td>
		  <td>2016-12-12</td>
          <td>赵四</td>
		  <td>无备注</td>
		  <td style="color:red">已被查看</td>
		</tr>
       <tr>
          <td><label><input type="checkbox" class="ace ace_cek"><span class="lbl"></span></label></td>
		  <td>JJ2016021812</td>
          <td>201608080002</td>
          <td>64V电池</td>
          <td>64VDH</td>
          <td>生产一线</td>
		  <td>南京仓</td>
          <td>200</td>
		  <td>2016-12-12</td>
          <td>王五</td>
		  <td>无备注</td>
		  <td style="color:red">已被查看</td>
		</tr>
         <tr>
          <td><label><input type="checkbox" class="ace ace_cek"><span class="lbl"></span></label></td>
		  <td>JJ2016021812</td>
          <td>201608080003</td>
          <td>48V电池</td>
          <td>48VDH</td>
          <td>生产二线</td>
		  <td>杭州仓</td>
          <td>600</td>
		  <td>2016-12-12</td>
          <td>赵四</td>
		  <td>无备注</td>
		  <td style="color:red">已被查看</td>
		</tr>
         <tr>
          <td><label><input type="checkbox" class="ace ace_cek"><span class="lbl"></span></label></td>
		  <td>JJ2016021812</td>
          <td>201608080004</td>
          <td>48V电池</td>
          <td>48VDH</td>
          <td>生产二线</td>
		  <td>南京仓</td>
          <td>200</td>
		  <td>2016-12-12</td>
          <td>王五</td>
		  <td>无备注</td>
		  <td style="color:red">未被查看</td>
		</tr>
        <tr>
          <td><label><input type="checkbox" class="ace ace_cek"><span class="lbl"></span></label></td>
		  <td>JJ2016021812</td>
          <td>201608080005</td>
          <td>64V电池</td>
          <td>64VDH</td>
          <td>生产三线</td>
		  <td>武汉仓</td>
          <td>200</td>
		  <td>2016-12-12</td>
          <td>赵六</td>
		  <td>无备注</td>
		  <td style="color:red">未被查看</td>
		</tr>
      </tbody>
	</table>
</div>
</div>
	<div style="position: absolute;right: 85px;">
	
  <br/>
  <br/>
  <br/>
  <br/>
 </div>
 <!--新增入库单图层-->
<div class="add_menber" id="add_menber_style" style="display:none">
    <ul class=" page-content">
     <li><label class="label_name">订单编号：</label><span class="add_name"><input value="" name="订单编号" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">产品名称：</label><span class="add_name"><input value="" name="产品名称" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">产品型号：</label><span class="add_name"><input value="" name="产品型号" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">生产部门：</label><span class="add_name"><select name='sldd' style='width:200px'>
		<option value='' selected>请选择</option>
		<option value='' >生产一线</option>
		<option value=''>生产二线</option>
    </select></span><div class="prompt r_f"></div></li>
     <li><label class="label_name">收货仓库：</label><span class="add_name"><select name='sldd' style='width:200px'>
		<option value='' selected>请选择</option>
		<option value=''>杭州仓</option>
		<option value=''>南京仓</option>
    </select></span><div class="prompt r_f"></div></li>
     <div class="prompt r_f"></div>
     <li><label class="label_name">入库数量：</label><span class="add_name"><input name="入库数量" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">交接日期：</label><span class="add_name"><input name="交接日期" type="text" id="rksj" class="text_add laydate-icon"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">交接人：</label><span class="add_name"><input name="交接人" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
	 <li><label class="label_name">备注：</label><span class="add_name"><input name="备注" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
    </ul>
 </div>
 
 </div>
		</div>
		</div>
 </div>
</div>
</body>
</html>
<script>
jQuery(function($) {
				var oTable1 = $('#sample-table').dataTable( {
				"aaSorting": [[ 1, "desc" ]],//默认第几个排序
		"bStateSave": true,//状态保存
		"aoColumnDefs": [
		  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		  {"orderable":false,"aTargets":[0,8,9]}// 制定列不参与排序
		] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})

/*打印入库单跳转*/
function member_dy(id){
	 var ace_che=$('.ace_cek').is(':checked');
	 if(!ace_che){
	 layer.open({
	 title: '提示',
	 content:'请选择需要打印的订单编号！'
	 })
	 return;
	 }
	 window.location.href='dd_dyrkd.html';
}

/*入库单-添加*/
 $('#member_add').on('click', function(){
    layer.open({
        type: 1,
        title: '新增交接单',
		maxmin: true, 
		shadeClose: true, //点击遮罩关闭层
        area : ['800px' , ''],
        content:$('#add_menber_style'),
		btn:['确定','取消'],
		yes:function(index,layero){	
		 var num=0;
		 var str="";
     $(".add_menber input[type$='text']").each(function(n){
          if($(this).val()=="")
          {
               
			   layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                title: '提示框',				
				icon:0,								
          }); 
		    num++;
            return false;            
          } 
		 });
		  if(num>0){  return false;}	 	
          else{
			  layer.alert('添加成功！',{
               title: '提示框',				
			icon:1,		
			  });
			   layer.close(index);	
		  }		  		     				
		}
    });
});
/*入库单-查看*/
function member_show(title,url,id,w,h){
	layer_show(title,url+'#?='+id,w,h);
}
/*入库单-编辑*/
function member_edit(id){
	  layer.open({
        type: 1,
        title: '修改交接单信息',
		maxmin: true, 
		shadeClose:false, //点击遮罩关闭层
        area : ['800px' , ''],
        content:$('#add_menber_styl'),
		btn:['确认修改','取消'],
		yes:function(index,layero){	
		 var num=0;
		 var str="";
     $(".add_menber input[type$='text']").each(function(n){
          if($(this).val()=="")
          {
               
			   layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                title: '提示框',				
				icon:0,								
          }); 
		    num++;
            return false;            
          } 
		 });
		  if(num>0){  return false;}	 	
          else{
			  layer.alert('修改成功！',{
               title: '提示框',				
			icon:1,		
			  });
			   layer.close(index);	
		  }		  		     				
		}
    });
}
/*入库单-删除*/
function member_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$(obj).parents("tr").remove();
		layer.msg('已删除!',{icon:1,time:1000});
	});
}
 laydate({
    elem: '#start',
    event: 'focus' 
});
laydate({
    elem: '#rksj',
    event: 'focus' 
});
laydate({
    elem: '#bjrksj',
    event: 'focus' 
});
</script>
